<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>webstorage留言板</title>
		<script src="js/jquery-1.7.2.min.js" type="text/javascript" charset="utf-8"></script>
		<script type="text/javascript">
			$(function(){
				if (localStorage.getItem("k_con")!=null) {
					"k_con",$("#dCon").html(localStorage.getItem("k_con"));
				}
			})
			function PostCon(){
				var sCon=$("#trCon").val();
				$("#dCon").append("<div>"+sCon+"</div>");
				localStorage.setItem("k_con",$("#dCon").html());
			}
			function Clear(){
				$("#dCon").html("");
				localStorage.clear();
			}
		</script>
	</head>
	<body>
		<div>
			<textarea id="trCon" rows="8" cols="30"></textarea>
		</div>
		<div>
			<input type="button" value="发表" onclick="PostCon()"/>
			<input type="button" value="清除" onclick="Clear()"/>
		</div>
		<div id="dCon"></div>
	</body>
</html>
